package com.dragon.logical.service.auth;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dragon.repository.entity.AddPageData;
import com.dragon.repository.entity.Examine;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dragon.repository.entity.ExamineUser;
import com.dragon.repository.entity.FromDetail;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 审批操作表 服务类
 * </p>
 *
 * @author sy
 * @since 2023-07-06
 */
public interface IExamineService extends IService<Examine> {

    /**
     * 申请分页
     * @param status
     * @param type
     * @param applicantId
     * @param page
     * @param limit
     * @return
     */
    Page<Examine> selectApplicantPageList(Integer status, Integer type,Integer applicantId, Integer page, Integer limit);

    /**
     * 审批分页列表
     * @param status
     * @param type
     * @param auditId
     * @param page
     * @param limit
     * @return
     */
    Page<Examine> selectAuditPageList(Integer status, Integer type, Integer auditId, Integer page, Integer limit);

    FromDetail selectDetailsById(Integer id,Integer type);

    List<Examine> getDetailsList(Integer id, Integer type);

    List<Examine> getExamineList(Integer id, Integer type);

    Examine getUserIsAuditBy(Integer adminId, Integer type, Integer mainId);


    void addExamine(AddPageData addPageAop);


    void audit(ExamineUser examineUser);

    /**
     * 反审核
     * @param streamType
     * @param correlationId
     */
    void antiAuditOperation(Integer streamType, Integer correlationId);

    void addOperation(Examine examine);

    void addSign(Examine examine);
}
